import request from '@/utils/myRequest'

// 活动列表
export function findAllRecommends() {
  return request({
    url: '/lejuAdmin/homeRecommend/findAllRecommends'
  })
}
// 添加活动
export function addRecommend(data) {
  return request({
    url: 'lejuAdmin/homeRecommend/addRecommend',
    method: 'POST',
    data
  })
}
// 删除活动
export function delRecommend(id) {
  return request({
    url: `/lejuAdmin/homeRecommend/delRecommend/${id}`,
    method: 'DELETE'
  })
}
// 获取活动明细
export function homeRecommend(id) {
  return request({
    url: `/lejuAdmin/homeRecommend/homeRecommend/${id}`
  })
}
// 修改活动
export function updateRecommend(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/updateRecommend`,
    method: 'POST',
    data
  })
}

